package com.jiazhong.basic.shuxin.design.策略模式;

// 旅游：上下文
public class TravelContext {

    private VehicleStrategy vehicleStrategy;

    public TravelContext(VehicleStrategy vehicleStrategy) {
        this.vehicleStrategy = vehicleStrategy;
    }

    public void play() {
        System.out.println("准备出去旅游");
        vehicleStrategy.vehicle();
        System.out.println("这个地方真不错");
    }
}
